﻿using System;
using System.Data;

namespace Data
{
    public abstract class Database
    {
        public abstract IDbConnection CreateConnection();
        public abstract IDbConnection CreateConnection(string cnnstr);
        public abstract IDbCommand CreateCommand();
        public abstract IDbTransaction CreateTransaction();
        public abstract IDataReader CreateReader();
        public abstract IDbCommand CreateCommand(string commandText, IDbConnection connection);
        public abstract void DeriveCommand(IDbCommand cmd);
        public abstract IDbCommand CreateCommand(CommandType commandType, string commandText);
        public abstract IDbCommand CreateCommand(string commandText);
        public abstract IDbCommand CreateCommand(string commandText, IDbConnection connection,IDbTransaction trn);
        public abstract IDbDataAdapter CreateAdapter(String commandText, String connectionString);
        public abstract IDbDataAdapter CreateAdapter(String commandText, IDbConnection connection);
        public abstract IDbDataAdapter CreateAdapter(IDbCommand cmd);
        public abstract IDbDataAdapter CreateAdapter();
        public abstract IDbDataParameter ParamAddWithValue(string paramName, object value);
        public abstract string GetParameterToken();
        public abstract IDbDataParameter CreateParam<T>(string paramName, DbType tip, T value);
        public abstract string ExecuteProcConvert(string sqlcmd);
    }
}
